// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "XSLibrary",
    platforms: [.iOS(.v10)],
    products: [
        // Products define the executables and libraries a package produces, and make them visible to other packages.
        .library(name: "XSLibrary",
                 targets: ["XSLibrary"]),
        .library(name: "LoadingView",
                 targets: ["LoadingView"]),
        .library(name: "JYEqualCellSpaceFlowLayout",
                 targets: ["JYEqualCellSpaceFlowLayout"]),
    ],
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        .package(url: "https://gitee.com/hanyzjob/SnapKit.git", from: "5.0.1"),
        .package(url: "https://gitee.com/hanyzjob/SDWebImage.git", from: "5.12.5"),
        .package(url: "https://gitee.com/hanyzjob/HandyJSON.git", from: "5.0.2"),
        .package(name: "Toast", url: "https://gitee.com/hanyzjob/Toast-Swift.git", from: "5.0.1"),
        .package(url: "https://gitee.com/hanyzjob/Alamofire.git", from: "5.5.0"),
        .package(url: "https://gitee.com/hanyzjob/RxSwift.git", from: "6.5.0"),
        .package(url: "https://gitee.com/hanyzjob/OHHTTPStubs.git", from: "9.1.0"),
        .package(url: "https://gitee.com/hanyzjob/RxAlamofire.git", from: "6.1.1"),
        .package(url: "https://gitee.com/hanyzjob/RxDataSources.git", from: "5.0.1"),
        
//        .package(url: "https://gitee.com/hanyzjob/SnapKit.git", .upToNextMajor(from: "5.0.1")),
//        .package(url: "https://gitee.com/hanyzjob/SDWebImage.git", .upToNextMajor(from: "5.11.1")),
//        .package(url: "https://gitee.com/hanyzjob/HandyJSON.git", .upToNextMajor(from: "5.0.2")),
//        .package(name: "Toast", url: "https://gitee.com/hanyzjob/Toast-Swift.git", .upToNextMajor(from: "5.0.1")),
//        .package(url: "https://gitee.com/hanyzjob/Alamofire.git", .upToNextMajor(from: "5.4.3")),
//        .package(url: "https://gitee.com/hanyzjob/RxSwift.git", .upToNextMajor(from: "6.2.0")),
//        .package(url: "https://gitee.com/hanyzjob/OHHTTPStubs.git", .upToNextMajor(from: "9.1.0")),
//        .package(url: "https://gitee.com/hanyzjob/RxAlamofire.git", .upToNextMajor(from: "6.1.1")),
//        .package(url: "https://gitee.com/hanyzjob/RxDataSources.git", .upToNextMajor(from: "5.0.1")),
        
//        .package(url: "https://github.com/SnapKit/SnapKit.git", .upToNextMajor(from: "5.0.1")),
//        .package(url: "https://github.com/SDWebImage/SDWebImage.git", .upToNextMajor(from: "5.11.1")),
//        .package(url: "https://github.com/alibaba/HandyJSON.git", .upToNextMajor(from: "5.0.2")),
////        .package(name: "Toast", url: "https://github.com/scalessec/Toast-Swift.git", .upToNextMajor(from: "5.0.1")),
//        .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMajor(from: "5.4.3")),
//        .package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "6.2.0")),
//        .package(url: "https://github.com/AliSoftware/OHHTTPStubs.git", .upToNextMajor(from: "9.1.0")),
//        .package(url: "https://github.com/RxSwiftCommunity/RxAlamofire.git", .upToNextMajor(from: "6.1.1")),
//        .package(url: "https://github.com/RxSwiftCommunity/RxDataSources.git", .upToNextMajor(from: "5.0.1")),
    ],
    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages this package depends on.
        .target(
            name: "XSLibrary",
            dependencies: [
                .product(name: "SnapKit", package: "SnapKit"),
                .product(name: "SDWebImage", package: "SDWebImage"),
                .product(name: "HandyJSON", package: "HandyJSON"),
                .product(name: "Toast", package: "Toast"),
                .product(name: "Alamofire", package: "Alamofire"),
                .product(name: "RxSwift", package: "RxSwift"),
                .product(name: "RxCocoa", package: "RxSwift"),
                .product(name: "RxRelay", package: "RxSwift"),
                .product(name: "RxBlocking", package: "RxSwift"),
//                .product(name: "RxTest", package: "RxSwift"),
                .product(name: "OHHTTPStubs", package: "OHHTTPStubs"),
                .product(name: "OHHTTPStubsSwift", package: "OHHTTPStubs"),
                .product(name: "RxAlamofire", package: "RxAlamofire"),
                .product(name: "Differentiator", package: "RxDataSources"),
                .product(name: "RxDataSources", package: "RxDataSources"),
            ]
        ),
        .target(
            name: "LoadingView",
            dependencies: [
                .product(name: "RxSwift", package: "RxSwift"),
                .product(name: "RxCocoa", package: "RxSwift"),
            ]
        ),
        .target(
            name: "JYEqualCellSpaceFlowLayout",
            dependencies: []
        ),
    ],
    swiftLanguageVersions: [.v5]
)
